#pragma once
#include "Common.h"
class ThreadCache
{
public:
	//申请和释放内存对象
	void* Allocate(size_t size);
	void Deallocate(void* ptr, size_t size);

	//从中央缓存获取对象(Central Cache)
	void* FetchFromCentralCache(size_t index, size_t size);
private:
	FreeList _freeLists[N_FreeList];
};
//TLS---thread local storage
static _declspec(thread) ThreadCache* p_TLS_ThreadCache = nullptr;
